package com.wondersgroup.core.service;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

@Service
public class BatchService {
	public Map<String, Object> findByBatchNo(String batchNo, String barcode) {
		Map<String, Object> map = new HashMap<String, Object>();

		if (barcode.equals("6948195800309")) {

			map.put("batchNo", batchNo);
			map.put("productDate", "2015-07-28");
			map.put("productCity", "上海");
			map.put("factory", "");
			map.put("company", "上海金龙鱼加工厂");
			map.put("address", "上海市新金桥118号B区");
		} else if (barcode.equals("6901209302220")) {
			map.put("batchNo", batchNo);
			map.put("productDate", "2015-07-16");
			map.put("productCity", "黑龙江齐齐哈尔市");
			map.put("factory", "");
			map.put("company", "光明乳业集团");
			map.put("address", "黑龙江新华南路");
		} else if (barcode.equals("6925303710156")) {
			map.put("batchNo", batchNo);
			map.put("productDate", "2015-08-15");
			map.put("productCity", "江苏省江苏市");
			map.put("factory", "");
			map.put("company", "统一企业食品有限公司");
			map.put("address", "昆山经济技术开发区青阳南路301号");
		}
		
		return map;
	}
}
